package com.zyh.demo;

public class ExceptionDemo3 {
    public static void main(String[] args) {
        try {
            int[] arr = {1, 2, 3, 4, 5};
            System.out.println(arr[5]);
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("问题是：");
            System.out.println(e.getMessage());
            String s = e.toString();
            System.out.println("s = " + s);
            e.printStackTrace();
        } finally {
            System.out.println("over");
        }
    }
}
